{% extends "templates/atnet_base.html" %}

{% block csslink %}
{{ super() }}
<script src="/media/js/jquery.js"></script>

{% include 'templates/includes_datatable.html' %}
{% include 'templates/includes_jquery_ui.html' %}
		<script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
				$('#accounts').dataTable({
					"bPaginate": false,
					"bLengthChange": false,
					"bFilter": true,
					"bSort": true,
					"bInfo": true,
					"oLanguage": {
		                "sUrl": "/media/js/dataTables.{{ app_user.lang }}.txt"
		            });
			} );
	    </script>

{% endblock %}

{% block title %} 
	{{ title }}
{% endblock %}

{% block header %}
{{ header }}
{% endblock %}

{% block login%}
{% if show_login %}
{{ super() }}
{% endif %}
{% endblock%}

{% block navigation %}
{% if not show_login %}
{{ super() }}
{% endif %}
{% endblock %}

{% block page_name %}
{{ content_header }}
{% endblock %}

{% block section_menu %}
{% include 'templates/includes_parametrage_menu.html' %}
{% endblock %}

{% block main_content %}
<p>
	<div id="demo">
	<form action="" method="POST">
	<p><input type="submit" value=" {{ _('Define set of subaccounts by template') }} "></p>
	</form>
	<table cellpadding="0" cellspacing="0" border="0" class="display" id="accounts" width="100%">
		<thead>
			<tr>
				<th width="5%"></th>
				<th align="right">{{ _(fields.code) }}</th>
				<th width="90%">{{ _(fields.name) }}</th>
			</tr>
		</thead>
		<tbody>
			{% if table %}
			{% for r in table %}
			<tr class="{{ loop.cycle('even gradeC', 'odd gradeC') }}">
				<td></td>
				{% if r[0] == 'acc' %}
				<td align="right"><b>{{ r[1] }}</b></td>
				<td><b>{{ r[2] }}</b></td>
				{% else %}
				<td align="right">{{ r[1] }}</td>
				<td>{{ r[2] }}</td>
				{% endif %}
				
			</tr>
			{% endfor %}
			{% endif %}
		
		</tbody>
		<tfoot>
			<tr>
				<th width="5%"></th>
				<th align="right">{{ _(fields.code) }}</th>
				<th width="90%">{{ _(fields.name) }}</th>
			</tr>
		</tfoot>
	</table>
	</div>
</p>			
{% endblock %}
